<template>
  <div>
    <el-form label-width="200px" :model="form" disabled>
      <el-form-item label="企业名称">
        <el-input v-model="form.name"></el-input>
      </el-form-item>
      <el-form-item label="公司地址">
        <el-input v-model="form.companyAddress"></el-input>
      </el-form-item>
      <el-form-item label="公司电话">
        <el-input v-model="form.companyPhone"></el-input>
      </el-form-item>
      <el-form-item label="邮箱">
        <el-input v-model="form.mailbox"></el-input>
      </el-form-item>
      <el-form-item label="备注">
        <el-input v-model="form.remarks"></el-input>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import { getCompanyById } from '@/api/setting'
import { mapGetters } from 'vuex'
export default {
  name: 'Setting',
  data () {
    return {
      form: {}
    }
  },
  computed: {
    ...mapGetters(['user/companyId'])
  },
  async created () {
    const res = await getCompanyById(this.companyId)
    // console.log(res)
    this.form = res
  }
}
</script>

<style lang="scss">
.el-form-item__content {
  width: 600px;
}
</style>
